
function getAjaxObj(){

	var xhre; 
	try {  xhre = new ActiveXObject('Msxml2.XMLHTTP'); }
	catch (e) 
	{
		try {   xhre = new ActiveXObject('Microsoft.XMLHTTP');	}
		catch (e2) 
		{

		  try { xhre = new XMLHttpRequest();	 }
		  catch (e3) {  xhre = false;   }
		}
	 }
	 return xhre;
}

function AjaxCheck(xhr){

	//	1 : success , 0 : failure , -1 : ignore
	if (xhr.readyState==4 && xhr.status==200)
	{
		return 1;
	}
	else if (xhr.readyState==4 && xhr.status != 200)
	{
		return 0;
	}
	else if (xhr.readyState==2 || xhr.readyState==3 )
	{
		return -1;
	}
	else{
		return -1;
	}
}

//	This is going to be deprecated
function checkAjaxCondition(xhr){
	if (xhr.readyState==4 && xhr.status==200)
	{
		return true;
	}
	return false;
}


